<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="<?php echo base_url('assets'); ?>/favicon.ico" type="image/x-icon" />

    <title><?php echo $title; ?></title>

    <link href="<?php echo base_url('assets/css/bootstrap.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/font-awesome/css/font-awesome.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/font-awesome/css/font-awesome.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/css/table.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/css/plugins/jQueryUI/jquery-ui-1.10.4.custom.min.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/css/plugins/jqGrid/ui.jqgrid.css'); ?>" rel="stylesheet">
    <!-- Gritter -->
    <link href="<?php echo base_url('assets/js/plugins/gritter/jquery.gritter.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/css/animate.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/css/style.css'); ?>" rel="stylesheet">
    <link href="<?php echo base_url('assets/css/mybutton.css'); ?>" rel="stylesheet">

    <!-- Data Tables -->
    <link href="<?php echo base_url(); ?>assets/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/css/plugins/dataTables/dataTables.responsive.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/css/plugins/dataTables/dataTables.tableTools.min.css" rel="stylesheet">


     <!-- FOOTABLE CSS-->
    <link href="<?php echo base_url('assets/css/plugins/footable/footable.core.css'); ?>" rel="stylesheet">

    <script src="<?php echo base_url('assets/js/jquery-2.1.1.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/bootstrap.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/plugins/metisMenu/jquery.metisMenu.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/plugins/slimscroll/jquery.slimscroll.min.js'); ?>"></script>

    <!-- Peity -->
    <script src="<?php echo base_url('assets/js/plugins/peity/jquery.peity.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/demo/peity-demo.js'); ?>"></script>

    <!-- Custom and plugin javascript -->
    <script src="<?php echo base_url('assets/js/inspinia.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/plugins/pace/pace.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/plugins/validate/jquery.validate.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/notification.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/notifyme.js'); ?>"></script>

     <!-- FooTable -->
    <script src="<?php echo base_url('assets/js/plugins/footable/footable.all.min.js'); ?>"></script>

    <!-- Data Tables -->
    <script src="<?php echo base_url(); ?>assets/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/plugins/dataTables/dataTables.responsive.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/plugins/dataTables/dataTables.tableTools.min.js"></script>

</head>
<body style="background-color: ##FEFEFE;" onunload="javascript:confirm_unload()">
<div class="wrapper wrapper-content page-heading animated fadeInRight">
    <div class="row">
        <div class="col-lg-8">
          <div class="ibox-content">
            <form class="form-horizontal">
              <div class="form-group"><label class="col-md-2 control-label">Entity Name: </label>
                  <div class="col-md-4"><p class="form-control-static"><?php echo $datas[0]->num; ?></p></div>
              </div>
              <div class="form-group"><label class="col-md-2 control-label">Account Name:</label>
                  <div class="col-md-4"><p class="form-control-static"><?php echo $datas[0]->name; ?></p></div>
              </div>
              <div class="form-group"><label class="col-md-2 control-label">Address</label>
                  <div class="col-md-4"><p class="form-control-static"><?php echo $datas[0]->area; ?></p></div>
              </div>
            </form>
            <table class="footable table table-striped">
              <thead>
                <tr>
                  <th data-type="numeric">Invoice ID</th>
                  <th data-type="alpha">Invoice Date</th>
                  <th data-type="numeric">Balance</th>
                </tr>
              </thead>
              <tbody>
              <?php $total = 0; ?>
               <?php foreach($datas as $d): ?>
                <tr>
                  <td align="right"><?php echo $d->invoice_id; ?></td>
                  <td><?php echo $d->invoice_date; ?></td>
                  <td align="right"><?php echo $d->balance; ?></td>
                </tr>
                <?php $total += $d->balance; ?>
              <?php endforeach; ?>
                <tr>
                  <td colspan="2" align="right">Total:</td>
                  <td align="right"><?php echo $total; ?></td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
    </div><!-- END of class row-->
</div>
<script>
    $(document).ready(function() {
      $('.footable').footable();
       // $('.footable').DataTable({
       //      "dom": 'lTfigtp',
       //      "iDisplayLength": 50,
       //      "tableTools": {
       //          "sSwfPath": "<?php echo base_url() ?>assets/js/plugins/dataTables/swf/copy_csv_xls_pdf.swf"
       //      }
       //  });
    });
</script>
</body>
</html>
